package com.authine.cloudpivot.web.api.quartz.task;

import com.alibaba.dubbo.config.annotation.Reference;
import com.authine.cloudpivot.engine.api.facade.TaskReportFacade;
import com.authine.cloudpivot.web.api.service.TimingTaskService;
import com.authine.cloudpivot.web.api.service.impl.TimingTaskServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class CloseDemandJob implements Job {
    @Reference(version = "1.00")
    private TaskReportFacade taskReportFacade;

    /**
     * 自动提交周报
     */
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("自动将周报状态设置成已关闭------------------------------------");
        taskReportFacade.autoCloseDemand();
        log.info("自动将周报状态设置成已关闭------------------------------------");
    }
}
